{include file='header.tpl'}
{include file='left.tpl'}
<div id="left-area">
    <div class="related-items clearfix" style="margin-top: 30px;">
        <h3 class="offer-title related_products">
            <span>Помощь</span>
        </h3>
        <div class="tab-content" style="display: block; border-top: 1px solid #DDDDDD; padding-bottom: 20px;">
            <h3>Получите быстрый ответ</h3>
            <div id="search-form" style="width: 420px; background: url(/images/search-bg_big.png) no-repeat; margin-top: 16px;">
                <form method="get" id="searchform" action="{geturl controller='help' action='search'}">
                    <!-- <input type="text" value="product/search" name="route" id="searchinput" style="display:none;"> -->
                    <input type="text" value="{$query}" style="width: 370px;" name="q" id="searchinput" onclick="if (this.value == 'например: как покупать')
                                this.value = '';" onblur="if (this.value == '')
                                            this.value = 'например: как покупать'" onkeydown="this.style.color = '#000000';">
                    <input type="image" src="/css/images/search_btn.png" id="searchsubmit">
                </form>
            </div>


        </div>
        {foreach from=$results item='page'}
            <p>
                <a href="{geturl route='helppage' alias=$page->alias}">{$page->name}</a>
            </p>
        {/foreach}
         <div class="botline"></div>
{if $pages->count_pages > 1}
<div class="wp-pagenavi">
<span class="pages">Страница {$p} из {$pages->count_pages}</span> 
<!-- Previous page link -->
 <a href="{geturl controller="help" action="search"}?q={$query}" class="last">«Первая</a> 
{if $pages->active > '1' }
<a href="{geturl controller="help" action="search"}?p={$pages->active-1}&q={$query}" >«</a> 
{/if}
<!-- Numbered page links -->
{section name=foo start=$pages->start loop=$pages->end step=1}

{if $smarty.section.foo.index != $pages->active }
<a href="{geturl controller="help" action="search"}?p={$smarty.section.foo.index}&q={$query}" class="page smaller">{$smarty.section.foo.index}</a> 
{else}
 <span class="current">{$smarty.section.foo.index}</span>
{/if}
{/section}
<!-- Next page link -->
{if $pages->active < $pages->count_pages}
<a href="{geturl controller="help" action="search"}?p={$pages->active+1}&q={$query}" class="nextpostslink">»</a>
 {/if}
 <a href="{geturl controller="help" action="search"}?p={$pages->count_pages}&q={$query}" class="last">Последняя»</a> 
 </div>
 {/if}
<div class="botline"></div>

    </div>
</div>
{include file='footer.tpl'}